() => {
    //直接定义对象类型
    const obj: { name: string, age: number } = {
        name: "张三",
        age: 20
    }
    //使用类型别名定义类型
    type objType = { name: string, age: number }
    const obj2: objType = {
        name: "张三",
        age: 20
    }

    //对象中的可选类型
    type obj3Type = { name: string, age: number, height?: number }
    const obj3: obj3Type = {
        name: "张三",
        age: 20,
        // height: 20
    }
}